Base64 Split

Single-line Base64 input
1 line · 0 chars

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

  1. Paste or upload the Base64 string
  2. Select split width (characters / bytes) or preset (MIME 76 / PEM 64)
  3. Choose line ending (\n / \r\n)
  4. 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.

PresetChars per lineStandardTypical scenario
MIME 7676RFC 2045Email attachments
PEM 6464RFC 1421 / 7468SSL / TLS certificates
OpenSSL 7070TraditionalLegacy system compatibility

5 typical Base64 split scenarios

Covers typical scenarios including mail, certificates, encoding, logs, and more.

ScenarioRecommended widthCore value
MIME email attachment76Compatible with email clients
PEM certificate64Standard PEM format
Logs / documents76-100Improved readability
Source code / Markdown76 / 80Source highlighting compatibility
Chunked resumable transferBy bytesNetwork transmission

Authoritative References