Convert your text to Base64 quickly and easily
Use this free online tool to encode your strings or texts into Base64 format. Fast, secure, and easy to use. No registration or installation required.
Base64 Encoder - Convert texts & strings to Base64 Instantly
Base64 encode
The Base64 Encoder is a simple and efficient online tool that converts text into a Base64-encoded string. Base64 encoding is commonly used for transmitting data in formats that require text-based representations, such as JSON, XML, or URL parameters.
How It Works
Base64 encoding converts raw data into a set of ASCII characters using a predefined encoding scheme. This process ensures compatibility when transferring data through text-based protocols. The encoded output depends on the specific implementation but any of them base on some common rules:
- a set of 64 characters only (quite obvious);
- the character set is part of a subset common to most encodings;
- characters are all printable.
Different implementations are possible. As an example "RFC 4648" defines the characters set as only letters (A-Z, a-z) and numbers (0-9) for the first 62 characters, and plus (+) and slash (/) symbols as last 2 characters - padding equal symbol (=) is used when necessary. "RFC 4648 / Base64URL" variant differs from the previous one for the last 2 character. It uses minus (-) and underscore (_) as they are URL safe.
Common Use Cases
- Embedding images or fonts in HTML/CSS
- Encoding binary files for safe transmission via email or APIs
- Storing data in text-based formats without corruption
- Securely encoding credentials (though Base64 is not encryption)
How to Use
This tool ensures quick and reliable Base64 encoding, making it a must-have utility for developers working with data serialization, APIs, or web applications.
The conversion process (encoding)
To convert a string into its Base64 format we need to follow these steps that represent the Base64 encoding algorithm:
Let's have a pratical example. For example into the phrase:
I am your FatherWe want to convert "Father" in Base64.
| Original | F | a | t | h | e | r | ||||||||||||||||||||||||||||||||||||||||||
| ASCII | 70 | 97 | 116 | 104 | 101 | 114 | ||||||||||||||||||||||||||||||||||||||||||
| Binary | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
| Index | 17 | 38 | 5 | 52 | 26 | 6 | 21 | 50 | ||||||||||||||||||||||||||||||||||||||||
| Base64 | R | m | F | 0 | a | G | V | y | ||||||||||||||||||||||||||||||||||||||||
| Final result | RmF0aGVy | |||||||||||||||||||||||||||||||||||||||||||||||
Base64 table from RFC 4648
| Index | ASCII |
|---|---|
| 0 | A |
| 1 | B |
| 2 | C |
| 3 | D |
| 4 | E |
| 5 | F |
| 6 | G |
| 7 | H |
| 8 | I |
| 9 | J |
| 10 | K |
| 11 | L |
| 12 | M |
| 13 | N |
| 14 | O |
| 15 | P |
| Index | ASCII |
|---|---|
| 16 | Q |
| 17 | R |
| 18 | S |
| 19 | T |
| 20 | U |
| 21 | V |
| 22 | W |
| 23 | X |
| 24 | Y |
| 25 | Z |
| 26 | a |
| 27 | b |
| 28 | c |
| 29 | d |
| 30 | e |
| 31 | f |
| Index | ASCII |
|---|---|
| 32 | g |
| 33 | h |
| 34 | i |
| 35 | j |
| 36 | k |
| 37 | l |
| 38 | m |
| 39 | n |
| 40 | o |
| 41 | p |
| 42 | q |
| 43 | r |
| 44 | s |
| 45 | t |
| 46 | u |
| 47 | v |
| Index | ASCII |
|---|---|
| 48 | w |
| 49 | x |
| 50 | y |
| 51 | z |
| 52 | 0 |
| 53 | 1 |
| 54 | 2 |
| 55 | 3 |
| 56 | 4 |
| 57 | 5 |
| 58 | 6 |
| 59 | 7 |
| 60 | 8 |
| 61 | 9 |
| 62 | + |
| 63 | / |
- Padding note: if you want to see a Base64 conversion example with padding look at the italian version of this page.