forgehub. A small, independent toolbox

Base64 Encoder/Decoder

How to encode and decode UTF-8 text in ForgeHub

Paste text into Input and select Encode to Base64. To reverse it, select Use output as input, then Decode to text. Copy or download the successful output. This tool accepts UTF-8 text and standard Base64 with required padding; it rejects Base64URL and non-UTF-8 binary. Conversions are explicit, and failed attempts leave the previous successful output available.

Open Base64 Encoder/Decoder

Encode a short message first

Base64 Encoder/Decoder has one editable Input and one read-only Output. Paste the text you want to convert into Input, then select Encode to Base64. The app does not guess the direction or convert while you type. For a simple first example, enter Hello with no surrounding spaces or line break: its encoded result is SGVsbG8=.

For accents, emoji and line breaks, use the same Encode action. The implementation converts text to UTF-8 bytes before producing Base64. Load sample supplies a Unicode example, but you still need to select Encode to Base64 afterward. Loading it replaces Input, so keep any text you need before using that control.

Reverse the result to check your text

After encoding, select Use output as input. This copies the result into the editable field without converting it. Select Decode to text next. For the Hello example, SGVsbG8= becomes Hello again. Check the returned text against the message you intended to encode, including spaces and line breaks.

You can also start with an existing Base64 string: paste it into Input and select Decode to text directly. Ctrl+Enter or Command+Enter encodes from the input editor; add Shift to decode. Choose the action that matches what is currently in Input.

Resolve strict decoding errors

The decoder accepts standard Base64 with required = padding. For example, use SGVsbG8= rather than the unpadded SGVsbG8. It ignores ASCII spaces, tabs, carriage returns, line feeds and form feeds when decoding, so a line-wrapped value can work. Other characters are not automatically stripped. Paste the value itself without surrounding quotation marks or labels.

Base64URL is unsupported. The decoder also checks padding bits: a string can use the allowed characters and still fail the canonical-form check. Finally, the decoded bytes must be valid UTF-8 text. If the error says they are not, this app cannot turn that payload into a binary file. Check what produced the value rather than assuming every failure means missing padding.

Distinguish current input from previous output

Editing Input leaves the last successful Output in place and changes the status to ask you to convert again. A failed conversion also keeps that result, with a status explaining that the previous successful output is unchanged. This protects a useful result while you correct a mistake, but visible output may belong to an earlier input.

Before copying, downloading or reusing a result, run the intended conversion and check for the success message. If validation fails, fix Input and retry. The retained output is not a partial conversion of the rejected value.

Read the byte limit before a large conversion

Input is limited to 1 MiB, or 1,048,576 UTF-8 bytes. Accented characters and emoji can require more than one byte, so visible character count is not a reliable size estimate. Shorten oversized input and try again. Encoding also rejects unpaired Unicode surrogates rather than silently substituting different text.

For decoding, the limit is checked before ignored whitespace is removed. A heavily wrapped Base64 value spends part of its allowance on spaces and line breaks. Encoded output can be larger than its original text; a successful encoding does not guarantee that the whole result will fit back into Input for a reverse conversion.

Copy or download before clearing the tab

Select Copy output to request clipboard access. If that fails or is unavailable, the app selects Output for manual copying with Ctrl+C or Command+C. Download output requests a UTF-8 text file: encoded-base64.txt for an encoded result or decoded-text.txt for decoded text. Your browser controls where it is saved.

Working text stays in tab memory, with no uploads or persistent storage by the app. Clear / reset or reload removes that working data. Save anything you need first; clipboard contents and downloaded files remain under your control. Base64 is reversible encoding, not encryption, so the encoded form does not protect a secret.

AI-assisted ForgeHub editorial. App capabilities were checked against its implementation; this guide is not an independent review.

Frequently asked questions

Can I decode an image or another binary file?

No. The decoder requires the resulting bytes to be valid UTF-8 text and rejects non-UTF-8 data. It does not offer a binary-file download workflow.

Why is Output still visible after an error?

A failed conversion deliberately preserves the last successful output. Correct Input and run the conversion again; check the success status before using the result.

Does an empty input count as an error?

No. Empty input produces empty output for either action. A successful empty result still enables the output actions.

Does this app save my conversion history?

No. Working content stays in tab memory. Reloading or using Clear / reset removes it; copy or download any result you want to keep.