Encoding
Escape any text for safe embedding inside a JSON string — quotes, backslashes, newlines, and control characters.
Escaping runs locally in your browser. Nothing is uploaded, logged, or stored.
Inside a JSON string, a bare double quote terminates the value and a backslash starts an escape sequence — so pasting raw text with either one breaks the whole document. This tool applies the exact escaping rules of RFC 8259: " → \", \ → \\, newlines → \n, tabs → \t, and other control characters to \uXXXX form.
The output contains no surrounding quotes, so you can drop it straight into an existing string field. Going the other way? Use the JSON Unescape tool. To escape a whole JSON document instead of plain text, see JSON Stringify.
Prepare a multi-line error message for inclusion in a JSON log payload without breaking the structure.
When writing a request body by hand, escape user-provided text before pasting it into a field.
Encode and decode Base64 with full Unicode support. URL-safe mode included.
Percent-encode and decode URLs and query parameters, component or full-URL mode.
Encode and decode Punycode (IDN) domain names — convert Unicode domains to xn-- form and back.
Encode and decode Base32 (RFC 4648) — the encoding used by TOTP authenticator secrets.
Looking for something else? Browse all tools