Dev Security: JSON & Tokens (2026)
Fix broken JSON, count LLM tokens, test regex, decode JWT, convert cURL, minify code, and generate UUIDs — all locally in your browser.
Every developer spends hours on the same tiny tasks. Fixing a broken JSON payload from ChatGPT. Converting a cURL command from API docs into working fetch code. Testing a regex that keeps failing. Counting tokens to estimate an LLM API bill.
This guide is the complete developer toolbox for 2026. Every tool runs in your browser, processes on your device, and never uploads your code, secrets, or API keys. No signup, no rate limits, no watermarks.
By the end, you will have a browser bookmark folder of developer tools that replaces half a dozen SaaS subscriptions and gives you more privacy in the process.
1. JSON: fix broken payloads from AI models
ChatGPT, Claude, and every other LLM regularly return broken JSON. Trailing commas, markdown fences, missing quotes, unescaped newlines. If your app calls JSON.parse() on the raw response, it crashes.
The JSON AI Fixer strips markdown, repairs trailing commas, escapes bad characters, and outputs clean, valid JSON. It runs the jsonrepair library entirely in your browser.
Repair AI JSON instantly, locally.
Fix Broken JSONOnce the JSON is clean, use the JSON to Code tool to auto-generate TypeScript interfaces, Go structs, or Rust types. Saves 10-30 minutes per new API integration.
Auto-create typed interfaces from any JSON payload.
Generate TypeScript from JSON2. Tokens: count before you pay
Every OpenAI, Anthropic, or Google AI API call is billed by tokens. A token is roughly 4 characters or 0.75 words. If you send a large system prompt 100,000 times per month, the cost compounds fast.
The LLM Token Counter uses the exact same Tiktoken library that OpenAI uses, so the count is accurate to the token. Use it to estimate costs, compare prompt sizes, and reduce wasted tokens.
Accurate Tiktoken counts for GPT-4o and beyond.
Count TokensThe Prompt Sanitizer removes invisible whitespace, trailing spaces, tabs, and excess newlines that waste tokens without adding value. It typically cuts 5-15 percent of a system prompt.
Strip token-wasting whitespace instantly.
Sanitize Prompts| Model | Input cost | Output cost | Best for |
|---|---|---|---|
| GPT-4o | ~$2.50/M | ~$10/M | General purpose, high accuracy |
| GPT-4o-mini | ~$0.15/M | ~$0.60/M | High volume, simple tasks |
| Claude 3.5 Sonnet | ~$3/M | ~$15/M | Long context, reasoning |
| Gemini 1.5 Pro | ~$1.25/M | ~$5/M | Huge context windows |
3. Regex: test before you ship
A bad regex can bring down your API. Catastrophic backtracking, unexpected greedy matches, subtle off-by-one errors. The Regex Tester shows live highlighting as you type and reports execution time, so you can spot performance issues before they hit production.
Live highlighting, capture groups, and timing.
Test RegexCommon patterns you can test instantly:
Email (basic): ^[^\s@]+@[^\s@]+\.[^\s@]+$
Phone (US): ^\+?1?[-.\s]?\(?[0-9]{3}\)?[-.\s]?[0-9]{3}[-.\s]?[0-9]{4}$
UUID v4: ^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
URL: ^https?:\/\/[^\s/$.?#].[^\s]*$4. cURL: convert docs to real code
You copy a cURL command from API documentation. It is 300 characters with escaped quotes, JSON payloads, and headers. Now you have to manually translate it into JavaScript.
The cURL to Fetch tool parses the cURL command and outputs clean fetch or axios code, with the body properly stringified, headers formatted, and method inferred correctly.
Generate fetch or axios code from any cURL command.
Convert cURL5. JWT: decode without trusting the source
JSON Web Tokens are opaque strings. To debug auth issues, you need to see the header, payload, and expiration. The JWT Decoder splits the token and shows the decoded claims without ever making a network request.
Read header and payload from any JWT locally.
Decode JWT6. Minify: faster sites, better SEO
Every byte of whitespace, comment, and unused variable in your CSS and JS costs real milliseconds on page load. Google treats page speed as a ranking factor. Minify before you deploy.
Shrink stylesheets by 40-60 percent.
Minify CSSSpeed up parsing and execution.
Minify JavaScriptRemove whitespace between tags.
Minify HTMLDo not minify once and forget. Add minification to your build pipeline. If you are using raw HTML/CSS/JS without a build step, minify before every deploy with these browser tools.
7. Base64: encode and decode safely
Base64 appears everywhere: JWT tokens, data URLs, email attachments, HTTP Basic Auth. The Base64 Encoder decodes and encodes text and small files locally. Perfect for testing API auth headers or decoding attachments.
Encode/decode text and files locally.
Base64 Tool8. Hash: verify integrity
Need to verify a downloaded file matches its SHA-256 checksum? The Hash Generator computes MD5, SHA-1, SHA-256, and SHA-512 for any file or text, entirely on your device.
MD5, SHA-1, SHA-256, SHA-512 all locally.
Generate Hash9. UUID: generate time-sortable IDs
If you are still using UUID v4 for database primary keys, you are hurting performance. Random IDs cause B-Tree index fragmentation, slowing down inserts and queries. UUID v7 and ULIDs are time-sortable — new records append to the end of the index.
Bulk-generate time-sortable IDs locally.
Generate UUID v710. Epoch: convert Unix timestamps
A database timestamp of 1729998000 — what day is that? The Epoch Converter converts Unix timestamps to local time, UTC, and ISO 8601, and detects whether the timestamp is in seconds or milliseconds.
Readable dates from raw Unix timestamps.
Convert EpochThe developer workflow that saves hours
Here is the pattern experienced developers use to save hours per week:
- When getting AI output: paste into JSON AI Fixer, then JSON to Code. Get typed objects in seconds.
- Before making LLM API calls: count tokens with Token Counter. Sanitize prompts. Know your cost.
- When debugging auth: decode JWT, count payload size, verify signature server-side.
- Before deploying code: minify CSS/JS/HTML. Regenerate thumbnails with Image Compressor.
- When building new tables: generate UUID v7 (not v4). Time-sortable IDs are 2-3x faster for inserts.
- When reading logs: Epoch Converter for Unix timestamps. JWT Decoder for tokens.
Why on-device tools matter for developers
When you paste API keys, database schemas, or JWT tokens into a random online tool, you are trusting that service with your application security. Most free tools upload your data to a server, log it, and sometimes monetize it.
Every tool in this guide runs on-device using JavaScript and WebAssembly. Open the Network tab in developer tools while using them: you will see no upload requests. Your data stays in your browser memory and is discarded when you close the tab.
Tools mentioned in this article
- JSON AI FixerOpen tool →
- JSON to CodeOpen tool →
- LLM Token CounterOpen tool →
- Prompt SanitizerOpen tool →
- Regex TesterOpen tool →
- cURL to FetchOpen tool →
- JWT DecoderOpen tool →
- Base64 EncoderOpen tool →
- JS MinifierOpen tool →
- CSS MinifierOpen tool →
- HTML MinifierOpen tool →
- Hash GeneratorOpen tool →
- UUID GeneratorOpen tool →
- Epoch ConverterOpen tool →
Frequently asked
Is the JSON AI Fixer safe for production payloads?
Yes. It uses the jsonrepair library running entirely in your browser. Nothing is uploaded. Safe for schemas, API keys, and proprietary data.
How accurate is the token counter?
It uses the exact same Tiktoken library OpenAI uses for GPT-3.5 and GPT-4. Accuracy is 100 percent for those models. Claude uses a different tokenizer, so the count is an estimate for Claude.
Can I convert cURL commands with POST bodies?
Yes. It parses the -d or --data flag, extracts headers, and formats the body as JSON or string as appropriate.
Does JWT decoding verify the signature?
No. JWT decoding just base64-decodes the payload. Signature verification requires the secret key and must be done server-side. Never trust a JWT without verification.
Why do some real files fail minification?
If the source code has syntax errors, the minifier cannot parse it. Fix the syntax errors first with a linter, then minify.
Does minification break JavaScript?
If done correctly, no. But if your code relies on Function.name or eval(), aggressive minifiers may break it. Always test after minifying.
What is UUID v7 and why does it matter?
UUID v7 is a time-sortable UUID standard released in 2024. Because IDs are sequential, database B-Tree indexes stay compact. This makes inserts 2-3x faster than random UUID v4 IDs.
Can I hash large files?
Yes, browser tools can hash files up to a few hundred MB. Larger files may run out of memory. For very large files, use the command-line sha256sum or shasum.
Are these tools offline capable?
After the first page load, yes. All logic runs locally. Once cached, you can use them without an internet connection.
Does the Prompt Sanitizer change prompt meaning?
No. It only removes whitespace, trailing spaces, tabs, and excess newlines. The semantic content is identical.
How much can prompt sanitization save?
Typically 5-15 percent of system prompt tokens. On a 2,000-token prompt sent 100,000 times per month, that is 1.5 million tokens saved — around $4 per month on GPT-4o, more on higher tiers.
Can I decode Base64 files?
Yes. For small files and text, yes. For large binary files, use a browser tool with file input support.
Is the Epoch Converter timezone-aware?
Yes. It displays the timestamp in your local timezone, in UTC, and as ISO 8601. It also detects seconds vs milliseconds automatically.
Why do I need to minify HTML if Gzip already compresses?
Minification reduces raw size before compression. The combined effect of minify + Gzip is better than Gzip alone. Both are recommended for production.
Do these tools work in all browsers?
Yes. Chrome, Edge, Firefox, and Safari all support them. Some very old browsers (pre-2020) may struggle with WebAssembly-heavy tools, but modern browsers have no issues.