Encode or decode base64

(Computation is automatic)
Encoded results:
Base64:
Base64Url:
Decoded results:
Notes:
  1. The page decodes or encodes in your browser. Any data you enter on this page stays in the browser, and is never sent back to a server site, nor to any third-party site.
  2. Here are a few test cases:
    Opmessageresult
    Encode abc (b64) YWJj
    (b64url) YWJj
    This-is-a-secret (b64) VGhpcy1pcy1hLXNlY3JldA==
    (b64url) VGhpcy1pcy1hLXNlY3JldA
    {"kid":"cb24a396-4414-4793-b4ce","typ":"JWT","alg":"HS256"} (b64) eyJraWQiOiJjYjI0YTM5Ni00NDE0LTQ3OTMtYjRjZSIsInR5cCI6IkpXVCIsImFsZyI6IkhTMjU2In0=
    (b64url) eyJraWQiOiJjYjI0YTM5Ni00NDE0LTQ3OTMtYjRjZSIsInR5cCI6IkpXVCIsImFsZyI6IkhTMjU2In0
  3. base64-encoded values are case sensitive. This is characteristic of the encodings, not particular to this page.
  4. When encoding message content:
    1. Unicode is ok.
    2. Whitespace in the content is significant. For example, the encoding for 'abc\n' is different from the encoding for 'abc'.
    3. This page does not strip trailing newlines.
    4. This page does convert line-breaks in your message to newline (\n). It's not possible to include a carriage-return (CR) in the text value, because the logic on this page strips them.
  5. When decoding, not all values that can be encoded in base64 will result in printable/displayable strings.