Expected double stringify
Running stringify twice produces an over-escaped value.
Fix: Run unstringify first, or check the input isn't already a literal.
header • up to 320x100 / 728x90
Wrap a raw string in a JSON string literal — perfect for embedding content in a JSON payload
Output will appear here...
content bottom • up to 300x250
sidebar • 160x600
Last reviewed:
JSON (JavaScript Object Notation) is a lightweight, human-readable data format used almost everywhere on the web for APIs, config files, and log output.
JSON Stringify calls JSON.stringify on your input, treating it as a raw string value. Quotes, backslashes, newlines, tabs, and Unicode characters are escaped according to the JSON spec.
It's the fastest way to prepare text for embedding inside another JSON payload — for example, when storing HTML, XML, or Markdown as a JSON string field.
<p>Hello "world"</p> Line two
"<p>Hello \"world\"</p>\nLine two"
Running stringify twice produces an over-escaped value.
Fix: Run unstringify first, or check the input isn't already a literal.
JSON strings can't hold raw binary bytes.
Fix: Base64-encode binaries first.
Stringify treats the entire input as a single string value. Formatting pretty-prints an already-valid JSON document.
Standard JSON.stringify behaviour — non-ASCII is emitted literally (UTF-8 safe).
Yes — they become \n sequences inside the output string.
No — encoding runs entirely in your browser.
Yes — e.g., JSON stringify + JS escape for deep-nested literals.
Pair JSON Stringify with the unstringify reverse tool and other escape helpers. You can also browse the full Encoders & Decoders category for more options.
Unwrap a JSON string literal back to raw text — reverses JSON.stringify
Escape JSON special characters
Escape or unescape JavaScript string literals with backslash, quote, Unicode, and control-character handling
Format, validate, and beautify JSON online with readable indentation, syntax checking, and copy-ready output for APIs, logs, and config files.
Wrap an XML document in a JSON string literal for safe embedding in payloads
Convert text to HTML entities or decode HTML entities back to text in a single bidirectional tool
Encode or decode JSON strings
Encode JSON for URL parameters
Escape or unescape C# string literals including \x, \u, and \U Unicode escape sequences
Round-trip Java string literals — escape quotes, backslashes, newlines, and Unicode sequences
Escape or unescape SQL string literals using standard single-quote doubling
Escape or unescape XML special characters and numeric entities with one click