Base64 Split
Online Base64 split tool that splits long Base64 strings into multiple lines by character count or byte count. Supports RFC 2045 76-character line wrapping standard, custom per-line width, suitable for MIME email attachments and PEM certificate display. All processing happens locally in the browser; your data never leaves the device.
Related
What is Base64 splitting?
Base64 splitting is the operation of cutting a long Base64 string into multiple lines according to rules. Common scenarios: ① MIME email attachments wrap at 76 characters per line; ② PEM certificates wrap at 64 characters per line; ③ Long strings need to be split into chunks by byte count for transmission.
**Why split?** Base64 is natively a single-line string, but: ① Mail protocols limit single-line length to 76 characters (MIME standard); ② Displaying in logs / source code is more readable line by line; ③ Some systems such as terminals wrap abnormally when a single line is too long.
**Two units:** ① By character count (76 chars/line) — RFC 2045 MIME standard; ② By byte count (57 bytes/line) — equivalent to the bytes corresponding to 76 Base64 characters. This tool defaults to characters and supports switching.
**Relationship to padding:** Splitting does not affect Base64 content, but each segment may require padding recalculation after splitting. This tool automatically ensures each segment is independently valid Base64.
Use Cases
- Preparing MIME email attachment format
- PEM certificate formatted display
- Display long Base64 strings line by line for readability
- Embedding long Base64 in logs / source code / Markdown
- Chunk transfer by byte count (resumable upload)
- Teaching Base64 standard line-wrapping format
How to Use
- Paste or upload the Base64 string
- Select split width (characters / bytes) or preset (MIME 76 / PEM 64)
- Choose line ending (\n / \r\n)
- Click the split button and view line count and result
Features
- Split Base64 by character / byte count
- MIME 76-char / PEM 64-char presets
- Custom per-line width
- Selectable line endings (\n / \r\n / \r)
- Option to preserve or not preserve padding
- Local browser processing: no content upload
- One-click reverse split (merge back to single line)
FAQ
How many characters per line does the MIME standard require?
The standard wraps every 76 characters (RFC 2045). This tool uses this setting by default.
Does Base64 size change after splitting?
Yes, it increases. Each 76 characters adds 2 bytes of newline (\r\n). A 1 MB Base64 grows by about 26 KB after splitting.
Can I use PEM split style?
Yes. This tool supports PEM (wrap every 64 characters), matching the display format of SSL/TLS certificates and X.509 certificates.
Will splitting and decoding affect content?
No. Splitting only inserts newlines into the Base64 string; the decoded byte stream is identical after decoding.
Can I specify characters per line?
Yes. This tool supports 40 / 50 / 64 / 76 / 80 / 100 / custom widths.
Can padding remain unchanged during splitting?
Yes. Padding in Base64 is always at the end; after splitting, the last segment remains terminated with =.
Is a 10MB Base64 file supported?
Yes. This tool uses streaming chunked processing for large Base64 strings without stuttering.
Is uploaded content sent to a server?
No. All processing is completed within the browser.
Troubleshooting
Byte length changed after merging the split result
Check whether the "Pad each chunk" option was enabled during splitting, which may have altered the trailing padding.
PEM format validation fails
Confirm that PEM-standard wrapping (64 characters per line with CRLF newlines) is used, and that the file includes BEGIN / END markers at the start and end.
Glossary
- MIME Base64 split
- RFC 2045 standard, Base64 wraps every 76 characters, with the last line being a multiple of 4.
- PEM split
- PEM certificates use Base64 wrapped every 64 characters.
- MIME line length
- Base64 under the MIME standard must not exceed 76 characters per line.
- Line ending
- Newline character sequence. Windows uses \r\n, Unix uses \n, classic macOS uses \r.
Comparison of 3 Base64 split presets
Different protocols and applications use different Base64 line-wrapping widths.
| Preset | Chars per line | Standard | Typical scenario |
|---|---|---|---|
MIME 76 | 76 | RFC 2045 | Email attachments |
PEM 64 | 64 | RFC 1421 / 7468 | SSL / TLS certificates |
OpenSSL 70 | 70 | Traditional | Legacy system compatibility |
5 typical Base64 split scenarios
Covers typical scenarios including mail, certificates, encoding, logs, and more.
| Scenario | Recommended width | Core value |
|---|---|---|
MIME email attachment | 76 | Compatible with email clients |
PEM certificate | 64 | Standard PEM format |
Logs / documents | 76-100 | Improved readability |
Source code / Markdown | 76 / 80 | Source highlighting compatibility |
Chunked resumable transfer | By bytes | Network transmission |
Authoritative References
- Secure String Comparison
- Binary Converter
- Caesar Cipher
- Morse Code Translator
- Hex Converter
- Video to Base64
- Base64 to Video
- Image to Base64
- Base64 to Image
- Text to Base64
- Base64 to Text
- File Hash Checker
- File to Base64
- Base64 to File
- Audio to Base64
- Base64 to Audio
- AES Encrypt / Decrypt
- DES Encrypt Decrypt
- Base32 Encoder Decoder
- Base58 Encode Decode
- Base64 Encode
- Base64 Decode
- Base64 Diff Checker
- Base64 Split
- Base64 Multi-line Merge
- Base64 Formatter
- Base64 Validation
- Base64 Batch Encode
- Base64 Batch Decoder
- Base64 Cleaner
- Base64 Padding Tool
- Base64 Length Statistics
- Base64 to HEX
- Base64 DataURL Converter
- Base64-Hex Converter
- Base85 Encoder
- HMAC Generator & Verifier
- PBKDF2 Key Derivation
- MD5 Hash
- SHA-256 Hash
- SHA1 Hash
- SHA512 Hash
- JWT Decode, Verify & Generate
- HTML Encode Decode
- Unicode Escape
- URL Encode
- URL Safe Base64
- MIME Base64
- Java Obfuscator
- JS Obfuscator
- PHP Obfuscator
- Python Obfuscator