Text to Base64
Base64 is a way of writing any text using only letters, numbers and a couple of symbols — which is what makes it safe to drop into a URL, an email header or a config file without anything mangling it. This encodes properly in UTF-8, so accented letters, Urdu, Arabic and emoji all survive; plenty of encoders quietly break on those.
Uses - and _ instead of + and /, and drops the = padding. Required for JWTs and query strings.
Nothing is uploaded — this tool runs inside your browser, so your files never leave your device.
Why use this tool
- Full Unicode support — accents, Urdu, Arabic and emoji all encode correctly
- URL-safe option for JWTs and query strings
- Optional line wrapping at 76 characters for email headers
- Runs in your browser, so nothing you paste is uploaded
How it works
- 1Paste your text into the box above.
- 2Switch on URL-safe output if it's going into a link or a token.
- 3Copy the Base64, or download it as a .txt file.
Text to Base64 — frequently asked questions
Moving text or binary data through systems that only handle plain characters safely. Email attachments, data URLs in CSS, and the payload of a JWT are all Base64. It is not encryption — anyone can decode it instantly.
More developer tools
Looking for something else? Browse all developer tools
Explore the other tools
Same deal everywhere on the site — free, no sign-up, and no watermark on anything you download.
Or see every tool on one page.