Blog

Check a Base64 string: decode Japanese text and restore files

Use Base64 Converter to round-trip Japanese text as UTF-8 and restore a file from Base64. Actual screenshots show which field to paste into, URL-safe and trailing = settings, and the downloaded filename.

English Base64 Converter with 確認OK in the left field and its Base64 representation in the right field.
The English Base64 Converter. UTF-8 text is on the left; Base64 is on the right.

For example, in an integration test with an external service, submitting a test order may return an invoice PDF encoded as Base64 through an API. Restoring and opening the PDF lets you check whether the order number and amount are as expected.

Base64 Converter lets you choose between reading the result as text and saving the original bytes as a file. Conversion and restoration happen entirely in the browser.

Round-trip text containing Japanese characters

  1. Enter 確認OK in the left Input text field. This Japanese sample means roughly “confirmation OK”; keep the characters unchanged to reproduce the example.
  2. Enable Padding “=”, disable URL-safe and Wrap every 76 chars, then press Encode →. The right Output field shows 56K66KqNT0s=. Use Copy to copy that value.
  3. Press Clear to empty both fields, then paste the copied value into the right field. Press ← Decode to restore 確認OK in the left field. To inspect Base64 you have received, you can start at step 3.
English interface after decoding 56K66KqNT0s= from the right field: 確認OK appears on the left and Decoded successfully below.
Paste into the right field and press ← Decode; the decoded text appears on the left.

Convert a file to Base64 and save it again

  1. Use Choose file (→ Base64) to select, for example, a UTF-8 sample named sample.txt containing status=ok followed by a newline. Its Base64 appears in the right field immediately. Images and other files can be converted the same way.
  2. With Base64 in the right field, press Base64 → File. To restore Base64 you have received, paste it into the right field first.
  3. If you know the original format, you can change the extension of the downloaded decoded.bin. In this example, rename it restored.txt and check for status=ok in a text editor.
English interface showing Saved file after converting sample.txt to Base64 and saving it with Base64 → File.
Immediately after saving the Base64 from the right field. The selected filename and size appear beside the controls.

Values to paste and conversion options

If a value has a prefix such as data:text/plain;base64,, paste only the Base64 portion after the comma. Before reading URL-safe values containing - or _, enable URL-safe. When passing output to another system, set URL-safe, trailing =, and 76-character line wrapping to match the receiving system’s requirements before converting.

← Decode displays the decoded bytes as UTF-8 text. For images or files in another character encoding, save with Base64 → File and open them in a suitable application. Base64 content becomes readable when decoded, so treat it like the original data before sharing it.