Text to Base64
UTF-8 text to standard Base64, padded on one unbroken line, and back again. Text to Hex and Text Stats too. Runs in the browser, nothing uploaded.
Still loading. If the tool doesn’t appear, reload this page.
About this tool
Text to Base64
Encode text into Base64 and decode Base64 locally.
Base64 is the RFC 4648 encoding that rewrites arbitrary bytes as 64 printable characters so they survive channels that only accept text — email bodies, JSON fields, data URIs and HTTP headers. This tool UTF-8 encodes what you type and converts it with the standard alphabet (A–Z a–z 0–9 + /), always = padded and emitted as one unbroken line, while Base64 -> Text decodes in the other direction. Two more one-click actions sit beside them, Text -> Hex and Text Stats, and everything runs in the browser, so nothing is uploaded.
How to use Text to Base64
Type or paste into the Tool input box, or press the 'Short note' or 'URL token' example chip to load a sample.
Press 'Text -> Base64' to encode, 'Base64 -> Text' to decode, or 'Text -> Hex' / 'Text Stats' for the other two conversions — the Output panel reruns with a live character count.
Press Copy for the clipboard, Download to save text-to-base64-textToBase64.txt, 'Use output' to push the result back into the input, or 'Save run' to keep it in the six-entry history tray.
Why use Text to Base64
Four conversions, one click each
Text -> Base64, Base64 -> Text, Text -> Hex and Text Stats all rerun as you type, with a live character count above both panels.
Copy, download or keep the run
Copy puts the output on the clipboard, Download saves it as text-to-base64-textToBase64.txt (slug plus active action), and Save run keeps the six most recent input and output snapshots in this browser.
Nothing leaves the browser
Encoding and decoding happen locally, so secrets are never sent to a server.
Common use cases
- Encode a small SVG or config snippet with Text -> Base64, then paste the result after your own data:image/svg+xml;base64, prefix in CSS or HTML
- Decode a Base64 blob you found in a log line or a config file with Base64 -> Text, then press Use output to push the decoded string back into the input box for a second pass
- Build an HTTP Basic auth header by encoding user:password before sending it in a test request
Frequently asked questions
How much bigger does Base64 make my data?
About 33% bigger: every 3 bytes of input become 4 output characters, plus up to 2 padding characters. So 3,000 bytes encode to 4,000 characters. This page emits the result as a single unbroken line and never inserts MIME line breaks, so the character count above the output panel is exactly that 4/3 ratio plus padding.
Link to answerWhat is the difference between Base64 and base64url?
Only two characters. Standard Base64 (RFC 4648 §4) uses + and / for values 62 and 63; base64url (§5) uses - and _ instead, because + and / have to be percent-escaped inside URLs and filenames. base64url also usually drops the trailing = padding, which is why JWT segments end without it. Text -> Base64 on this page always emits the standard alphabet with padding — for the URL-safe form, use the Base64 URL Encoder or Base64 URL Converter tools.
Link to answerIs Base64 encryption?
No. Base64 is a reversible encoding with no key, so anyone can decode it in a second — exactly what this page does. Use it to make bytes transport-safe, never to hide a password, token or personal data.
Link to answerWhy does my Base64 string fail to decode?
Almost always the alphabet. Base64 -> Text trims the string and strips a leading data: prefix, then hands it to the browser's decoder without translating URL-safe characters, so a token containing - or _ fails here even though it is valid base64url. A stray character outside the 64-symbol alphabet, or a truncated body whose length modulo 4 is 1, fails the same way. The output panel then shows Error: followed by the browser's own message, and the panel heading switches to Needs attention.
Link to answerEmbed this tool on your site
Add the Text to Base64 widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/text-to-base64"
title="Text to Base64 — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/text-to-base64?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>