---
title: base64
description: base64 — encode and decode base64 strings
component: pingds
version: 8.1
page_id: pingds:tools-reference:base64
canonical_url: https://docs.pingidentity.com/pingds/8.1/tools-reference/base64.html
section_ids:
  synopsis: Synopsis
  base64-description: Description
  base64-options: Options
  base64-subcommands: Subcommands
  base64_decode: base64 decode
  options: Options
  base64_encode: base64 encode
  options_2: Options
  exit_codes: Exit codes
---

# base64

`base64` — encode and decode base64 strings

## Synopsis

`base64 {subcommand} {options}`

## Description

This utility can be used to encode and decode information using base64.

## Options

The `base64` command takes the following options:

* `-V | --version`

  Display Directory Server version information. Default: false

* `-H | --help`

  Display this usage information. Default: false

## Subcommands

The `base64` command supports the following subcommands:

### base64 decode

`base64 decode {options}`

Decode base64-encoded information into raw data. When no options are specified, this subcommand reads from standard input and writes to standard output.

#### Options

In addition to the global `base64` options, the `base64 decode` subcommand takes the following options:

* `-d | --encodedData {data}`

  The base64-encoded data to be decoded.

* `-f | --encodedDataFile {path}`

  The path to a file containing the base64-encoded data to be decoded.

* `-o | --toRawFile {path}`

  The path to a file to which the raw base64-decoded data should be written.

### base64 encode

`base64 encode {options}`

Encode raw data using base64. When no options are specified, this subcommand reads from standard input and writes to standard output.

#### Options

In addition to the global `base64` options, the `base64 encode` subcommand takes the following options:

* `-d | --rawData {data}`

  The raw data to be base64 encoded.

* `-f | --rawDataFile {path}`

  The path to a file containing the raw data to be base64 encoded.

* `-o | --toEncodedFile {path}`

  The path to a file to which the base64-encoded data should be written.

## Exit codes

* 0

  The command completed successfully.

* \> 0

  An error occurred.
