# RSA Signature Generator (SHA256withRSA)

> Sign a string with your RSA private key and get the Base64 signature. Accepts PKCS#8 and PKCS#1 keys.

URL: https://uttir.com/rsa-sign
Categories: security-tools, developer-tools
Privacy: Your private key is processed in this browser tab and never sent anywhere — there is no server. Nothing is stored, so reloading the page clears it.

## About

Produce an RSA signature without leaving the browser. Paste a private key and a message, and you get the Base64 signature back — the same value you would get from `openssl dgst -sha256 -sign`.

This is the scheme Indonesian payment APIs use for the X-SIGNATURE header: SHA256withRSA, also called RSASSA-PKCS1-v1_5. It is not the same as RSASSA-PSS, and a signature made with one is rejected by a verifier expecting the other.

## How to use

1. **Paste your private key** — PKCS#8 (BEGIN PRIVATE KEY) and PKCS#1 (BEGIN RSA PRIVATE KEY) both work.
2. **Paste the string to sign** — The exact text, with no trailing newline.
3. **Copy the signature** — Base64, ready for an X-SIGNATURE header.

## FAQ

### Is my private key safe here?

Yes. The signing happens in this browser tab using the browser's own cryptography API. There is no server to send it to, and nothing is written to storage — reloading the page clears the key. As with any tool that handles a key, use a test key on a shared computer.

### Why does my key need converting?

Browsers can only import PKCS#8 keys. If your key says BEGIN RSA PRIVATE KEY, it is PKCS#1 — the format `openssl genrsa -traditional` produces, which several payment providers ask for. This tool converts it automatically.

### Which algorithm is this?

SHA256withRSA, meaning RSASSA-PKCS1-v1_5 with a SHA-256 digest. That is what SNAP and QRIS acquirers verify.

### Can I verify a signature I received?

Yes — use the RSA Signature Verifier with the public key.

## Related tools

- [RSA Signature Verifier](https://uttir.com/rsa-verify) — Check whether a Base64 RSA signature is valid for a message and public key. SHA256withRSA and PSS supported.
- [SNAP / QRIS Request Signer](https://uttir.com/snap-string-to-sign) — Build the stringToSign and X-SIGNATURE for Indonesian payment APIs. Handles the B2B token and transactional forms.
- [RSA Key Generator](https://uttir.com/rsa-keygen) — Generate an RSA key pair in your browser. 2048, 3072 or 4096 bits, exported as PEM — nothing is uploaded.
- [JWT Sign (HS256 / RS256)](https://uttir.com/jwt-sign) — Sign a JSON Web Token with HS256 (HMAC shared secret) or RS256 (RSA private key). Output is a standard compact JWT (header.payload.signature).

---

For the full HTML page with the live tool, visit https://uttir.com/rsa-sign.
This file is the markdown rendering at https://uttir.com/rsa-sign.md. See https://uttir.com/llms.txt for a site-wide summary.
