Data Formatting & String Inspection Workbench

Lightweight, zero-dependency browser utilities for validating structured JSON payloads, inspecting UTF-8 byte lengths, and transforming encoded strings. All operations execute locally in your browser's JavaScript runtime.

Raw JSON Input 0 B
Formatted Output Ready
Status: Waiting for input... Specification: RFC 8259 / ECMA-404
0
Characters
0
Chars (No Spaces)
0
Words
0
Lines
0
UTF-8 Bytes
Source String
Transformed Result

Technical Notes & Implementation Standards

RFC 8259

Strict JSON Parsing Rules

Unlike relaxed JavaScript object literals, compliant JSON documents require double-quoted property keys ("key": "value") and strictly forbid trailing commas in arrays or objects.

Numbers cannot contain leading zeros, and special numeric values such as NaN or Infinity are not permitted under the ECMA-404 grammar.

Unicode / UTF-8

String Length vs. Byte Size

JavaScript strings use UTF-16 code units internally, meaning str.length reports code units rather than actual network payload size.

Our inspector uses the standard TextEncoder API to compute exact UTF-8 byte lengths—essential when verifying HTTP header limits or database column constraints.

RFC 4648

UTF-8 Safe Base64 Encoding

The native browser btoa() function only accepts Latin1 characters and throws a DOMException on multi-byte Unicode input.

This workbench serializes strings into a UTF-8 byte stream before Base64 conversion, ensuring full compatibility with international characters and symbols.

Common Character Encoding Reference

Character / Range Unicode Code Point UTF-8 Byte Length URL Percent-Encoded
Standard ASCII (e.g., A-Z, 0-9) U+0000 – U+007F 1 Byte Unchanged (Unreserved)
Space ( ) / Delimiters (?, &, =) U+0020 / U+003F / U+0026 1 Byte %20 / %3F / %26
Latin Extended / Accented Characters U+0080 – U+07FF 2 Bytes 2 Percent-Encoded Octets
CJK Ideographs & Common Symbols U+0800 – U+FFFF 3 Bytes 3 Percent-Encoded Octets
Supplementary Planes (Emojis / Astral) U+10000 – U+10FFFF 4 Bytes 4 Percent-Encoded Octets