---
title: "Base64-decode a string"
method: POST
path: "/base64-decode.php"
tags: ["encoding"]
---

# Base64-decode a string

`POST /base64-decode.php`

## Request

- Base URL: `https://mate.tools/api/v1`
- URL: `https://mate.tools/api/v1/base64-decode.php`
- Auth: none declared

Decodes Base64. Accepts both standard and URL-safe alphabets; missing padding is auto-fixed. If the decoded bytes are valid UTF-8, returns them as text; otherwise returns hex.

## Request body

- object
  - `encoded` string, required

## Response `200`

Success

## Other responses

- `400`: Malformed request
- `413`: Request body or text exceeds 1 MB
- `429`: Rate limit exceeded (60/min, 600/hour per IP). Includes Retry-After header.

---

[API](https://skmtc.dev/mate/apis/mate-tools-api.md) · [All operations](https://skmtc.dev/mate/apis/mate-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mate/apis/mate-tools-api/revisions/874670b78962?raw)
