Plain text input
Paste readable text to produce a valid JSON string literal.
Convert plain text to JSON-escaped strings and decode escaped JSON strings back to readable text.
Paste readable text to produce a valid JSON string literal.
Read-only text. Input is parsed as data only and is never executed.
Output appears here as you type.
Use JSON escaping when text needs to live inside a JSON string literal, log line, fixture, or embedded API payload.
A JSON string is wrapped in double quotes and uses backslash escapes for characters that would otherwise break the string, such as quotes, backslashes, newlines, tabs, carriage returns, backspace, and form feed.
Escaping turns readable text into JSON-safe text with sequences such as \", \\, \n, and \u003c. Unescaping parses those sequences back to the characters they represent.
JSON supports Unicode escape sequences in the form \uXXXX. This tool uses JSON parsing behavior, so sequences like \u003c become readable characters when unescaped.
Escape JSON strings for API payload examples, test fixtures, log snippets, embedded configuration, command output, and documentation where a value must remain one valid JSON string.
Malformed sequences such as \x, incomplete \u escapes, and raw line breaks inside quoted JSON strings are reported as parse errors instead of guessed.
JSON escaping is for JSON strings. HTML entity encoding protects text inside HTML source, URL encoding prepares URL components, and Base64 encodes bytes for transport.
Use JSON escaping for string literals inside JSON. Use the HTML Entity Encoder/Decoder when text will be inserted into HTML markup. Use a URL Encoder/Decoder for path segments, query parameters, or form values. The same character can require different escaping depending on where it will be used.
No. Escaping, unescaping, validation, copy actions, and downloads run locally in your browser.
Include quotes when you need a complete JSON string literal. Remove quotes when you only need the escaped content to paste inside an existing quoted string.
Yes. Valid JSON Unicode escapes are parsed with native JSON behavior, so \u003c decodes to a less-than character.
No. JSON escaping keeps text valid inside JSON strings. HTML entity encoding is a separate operation for HTML source and characters such as <, >, and &.
No. The input is treated as text and parsed only as a JSON string value. Output is shown as plain text.