FA Dev Tools

JSON String Encode / Decode

Encode text so it can be embedded inside a JSON string value (quotes, backslashes and control characters are backslash-escaped), or decode escaped text back to the original.

Instructions

Converts between raw text and the backslash-escaped form JSON string values use.

  1. Paste or type the text into Input.
  2. Pick Encode to escape the text for embedding in JSON, or Decode to recover the original from an escaped string.
  3. The result appears in Output as you type — use Copy to take it.

Tips

  • Encoding escapes ", \, newlines, tabs and every other control character, as RFC 8259 requires. Decoding reverses every JSON escape, including \uXXXX.
  • Handy when a log line or config value arrives already escaped and you want to read it: decode it, and the real line breaks come back.
  • Hit Example and pick a direction to see both shapes side by side.