Developer Utilities

Base64 Splitter

All tools

Re-wrap a single-line Base64 blob to the line width your file format expects.

How it works

Four simple steps

1

Paste the Base64

One long line or text already wrapped at another width.

2

Set the width

Use 64 for PEM, 76 for MIME, or any width from 8 up.

3

Check the lines

The wrapped version appears instantly in the output panel.

4

Copy or download

Paste it between your header and footer lines, or save wrapped.txt.

Base64 Splitter

About Base64 Splitter

You pasted a certificate body as one long line and the server refuses it, because PEM expects lines of 64 characters. Or a library produced 76-character lines and the target format wants 64. Base64 Splitter re-wraps the text in either case.

Set the line width (76 by default, minimum 8) and the output updates as you type. Spaces and existing line breaks are removed from the input first, so you can re-wrap text that was already broken at a different width. The usual targets are 64 characters for PEM files such as certificates and private keys (RFC 7468) and 76 characters for MIME email bodies (RFC 2045). Copy the result or download it as a text file.

The splitter changes layout only. It does not add the BEGIN CERTIFICATE header and footer lines, and it does not check that the content is valid Base64, so run anything from an unreliable copy through the Base64 validator first. To read what is inside a certificate after wrapping it, the X.509 certificate decoder parses the PEM block for you.

Wrapping is a single regular expression applied in your browser tab. Keys and certificates pasted here are not uploaded.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Sixty-four characters per line, with the BEGIN and END lines added separately. Many parsers tolerate other widths, but OpenSSL and some Java tooling can be strict, so 64 is the safe choice.

No. Base64 decoders skip line breaks, so the wrapped and unwrapped forms decode to the same bytes. Only the text layout changes.

That is the maximum Base64 line length for MIME email defined in RFC 2045, and it matches the default wrapping of the GNU base64 command. Change it to whatever your format requires.

View more FAQs

Related tools

View all

Cron Calendar

Explain cron expressions and preview the next run times in any timezone.

Open

CSV to SQL

Infer column types and generate CREATE TABLE + INSERT statements from CSV.

Open

SQL Query Builder

Build SELECT queries visually and reverse-parse SQL into a structure tree.

Open

Log Pattern Miner

Cluster log lines into templates, surface anomalies, and mask PII locally.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools