Skip to content

Base64URL Encoder

Runs in your browser

The URL-safe variant every JWT segment uses. Encode text or decode a segment, with UTF-8 handled properly.

Text

How this one works

Base64URL is standard Base64 with + and / swapped for - and _, and the trailing = padding removed, so the result can sit in a URL or a JWT without escaping.

Text is converted to UTF-8 bytes before encoding, so accents, emoji and non-Latin scripts round-trip correctly. Decoding also accepts standard Base64 and padding.

Questions

Is Base64URL encryption?
No — it’s an encoding, reversible by anyone. That’s why a JWT’s payload is readable without a key; only the signature protects it from being changed.
Why does decoding say the result is binary?
Some Base64URL strings hold raw bytes rather than text, such as a JWT signature. Those can’t be shown as characters, so the bytes are shown as hex instead.
What’s the difference from regular Base64?
Two characters and the padding. Regular Base64 uses + and / and pads with =, all of which have special meaning in URLs. Base64URL avoids them.

Keyboard shortcuts

Global

  • Show this shortcuts dialogShift?
  • Toggle light / dark themeCtrlShiftL
  • Close dialogsEsc

Formatter & Validator

  • Format JSONCtrlEnter
  • Minify JSONCtrlShiftM
  • Copy outputCtrlShiftC
  • Download output as .jsonCtrlShiftS
  • Clear input and outputCtrlShiftX

Tree Viewer

  • Focus the search box/
  • Expand all nodesCtrlShiftE
  • Collapse all nodesCtrlShiftR

Diff

  • Swap document A and BCtrlShiftS

JSON tools

JSON FormatterPretty-print or minify
JSON ValidatorCheck strict JSON validity
JSON Tree ViewerBrowse JSON as a tree
JSON DiffCompare two documents
JSON Path FinderExplore JSONPath expressions
JSON → CSVFlatten JSON into rows
CSV → JSONTurn rows back into objects

JWT tools

JWT DecoderRead header, payload, claims
JWT VerifierCheck an HMAC signature
JWT Expiry Checkeriat, nbf and exp in local time
JWT GeneratorBuild a signed test token
Base64URL EncoderEncode or decode a segment

Code formatters

SQL FormatterBeautify or minify SQL
HTML FormatterBeautify or minify HTML
CSS FormatterBeautify or minify CSS
JavaScript FormatterBeautify or minify JS
Markdown to HTMLConvert with a live preview

Pages

JSON toolsFormat, validate, compare and convert JSON.
JWT toolsDecode, verify and generate JSON Web Tokens.
Code formattersBeautify and minify SQL, HTML, CSS and JavaScript.
HomePopular tools and categories
All categoriesBrowse tools by category
AboutWhat ToolJar is and why
PrivacyWhat is and is not collected

Theme

Switch to light theme
Switch to dark theme