Utility
Local · Zero upload

Codec

Base64 · URL Encode/Decode

Codec

Ready

Raw input

                                
                            
Parsed output

                                
Fixed height; long code scrolls inside the panel

ABOUT

About Codec

Base64 or URL percent encode/decode text—fix encoding issues in API transport.

Base64 and URL encoding are HTTP punctuation: Data URLs, Basic Auth, query params, JWT segments—all rely on them. Local encode/decode keeps credential fragments off untrusted online sites.

DEEP DIVE

Learn more about Codec

Base64 turns binary or UTF-8 text into ASCII-safe characters—email attachments, Data URLs, JWT segments, API transport. URL encoding (percent-encoding) turns special chars into %XX—standard for HTTP query and path. JSONSort supports both ways, instantly and locally.

For Base64 with Chinese text, keep UTF-8 consistent; for URL encoding, know encodeURI (keeps URL structure chars) vs encodeURIComponent (encodes all specials).

Base64 adds ~33% size—good for binary-safe text transport. URL encoding works byte-wise on UTF-8—Chinese often becomes %E4%B8%AD. Wrong encoding causes 404s or mojibake—agree with the receiver.

FEATURES

Core capabilities

01

Base64 encode

Text or UTF-8 strings to Base64.

02

Base64 decode

Base64 back to original text—including Chinese.

03

URL encode

Special characters to %XX percent-encoding.

04

URL decode

Restore %XX encoding to readable strings.

05

Instant conversion

Input changes update output—no button click.

06

Local & safe

Credentials, token fragments, and other sensitive strings never upload.

07

UTF-8 Safe

Chinese and emoji encode/decode without loss, consistent with Node Buffer behavior.

08

Multi-Mode Switching

Base64 and URL modes are independent to avoid mixed use producing wrong results.

HOW TO USE

How to use

  1. 1

    Paste Raw Text

  2. 2

    Choose Base64 or URL encode/decode

  3. 3

    Copy Output

  4. 4

    Use the sample data button to quickly understand input/output formats

  5. 5

    Copy results to clipboard, or chain with other JSONSort tools

WORKFLOW

Typical workflow

End-to-end workflow from import to export, helping teams standardize encoding/decoding usage.

1

Choose Encoding Type

Use Base64 for binary/text transfer; use URL encoding for query parameters.

2

Enter Original Text or Encoded String

Copy from headers, logs, or Data URLs.

3

Verify Round-Trip

Encode then decode and compare with the original to confirm lossless conversion.

4

Use Downstream

Copy results to HTTP clients or source code.

USE CASES

Use cases

Frontend

Frontend developers

Build Data URLs, debug Base64 inline images, encode URL parameters.

Backend

Backend developers

Verify that Base64 fields from clients decode correctly.

Testing

QA engineers

Build URL-encoded test parameters to debug double-encoding bugs.

Security

Security

Decode sensitive payloads locally—avoid untrusted online tools.

Full Stack

Full-Stack Debugging

Build Basic Authorization headers (base64(user:pass)).

Email

Email Development

Locally decode and verify MIME base64 attachment fragments.

TIPS

Tips

  • Base64 decode failures are usually missing padding or illegal characters—check trailing = signs.
  • Chinese Base64 encode/decode uses UTF-8 throughout, consistent with Java standard Base64 defaults.
  • When URL decoding, note that + in query strings may represent a space (application/x-www-form-urlencoded).
  • The middle JWT Payload segment is Base64URL—use Base64 decode to inspect it (note the URL-safe variant).
  • Pair with the Query tool: encode query parameters or decode and analyze existing URLs.
  • For Data URL format data:text/plain;base64,XXX, strip the prefix before decoding.
  • The second JWT segment is Base64URL; standard Base64 decode usually works but watch for - and _ characters.
  • encodeURI preserves URL structure characters like : / ? #; use encodeURIComponent for parameter values.
  • Strip the data:*;base64, prefix from Data URLs before decoding.
  • Chain with the Query tool: JSON → query → URL encode—all locally in one flow.

LOCAL VS ONLINE

Local vs online tools

JSONSort stays purely frontend—this comparison shows why local tools fit dev data better.

Comparison
JSONSort (local)
Typical online tools
Data privacy
Fully local, zero upload
Most require server upload
Response speed
Milliseconds, no network latency
Affected by network and server load
Offline use
PWA offline supported
Usually requires internet
Sensitive data
JWT/config/logs handled with confidence
Leak risk
Ads & tracking
No ads, no data tracking
Most include ads or Analytics
File drag-and-drop
Import local files directly
Some tools limit upload size
Tool integration
19 tools on one page
Usually one site per tool
Open & transparent
Pure static pages—audit the source
Closed-source server, not auditable

TROUBLESHOOTING

Common pitfalls & fixes

Issues you may hit in practice and how to handle them—save time on trial and error.

Base64 Decodes to Gibberish

Tip:May be UTF-16 or wrong charset; confirm the source is UTF-8.

% Still Remains After URL Decode

Tip:Double encoding; decode again or check who encoded twice.

+ Becomes Space

Tip:In query strings, + means space; form encoding differs from URL standards.

JWT Segment Decode Failed

Tip:Use the Base64URL variant; remove the Bearer prefix and decode only the payload segment.

FAQ

FAQ

What's the difference between Base64 and Base64URL?

Base64URL replaces + / with - _; JWT uses Base64URL. Standard Base64 decode is compatible in most cases.

Can it handle binary files?

Text mode suits strings. For binary files, use file import to convert to Base64.

Which URL encoding standard is used?

encodeURIComponent semantics, suitable for query parameter value encoding.

Can Base64 decode without trailing =?

URL-safe Base64 often omits padding; the decoder auto-pads.

Same result as Node btoa?

ASCII text matches; for Chinese, use this tool's UTF-8 mode—btoa needs extra handling.

Is data uploaded to a server?

No. All JSONSort tools run locally in your browser—your input is never sent to any backend.

Do I need to sign up or install anything?

No. Open the page and go—no account, no client download, PWA offline cache supported.

How large can files be?

Depends on browser memory; multi-MB data usually runs smoothly. Split very large files or use merge & clean first.

Copied to clipboard