# Bitcrush an Audio File

Crush audio into lo-fi, retro and 8-bit textures by reducing bit depth, lowering the effective sample rate and blending the result in your browser.

## Run it

- **CLI:** `gizza tool bitcrush 'url=https://example.com/input' 'bits=8' 'sample_rate_hz=8000' 'mix=1' 'drive=1' 'output_gain=1' 'anti_alias=0.5' 'mode=lin' 'format=mp3'`
- **Web:** https://gizza.ai/tools/bitcrush/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/bitcrush/tool.json

## Inputs

- `file` — Audio _(file; accept: audio/*)_
- `bits` — Bit depth (1-16) _(field)_
- `sample_rate_hz` — Effective sample rate (Hz) _(field)_
- `mix` — Wet/dry mix (0-1) _(field)_
- `drive` — Input drive (0.25-4) _(field)_
- `output_gain` — Output gain (0.25-4) _(field)_
- `anti_alias` — Anti-aliasing (0-1) _(field)_
- `mode` — Quantiser curve _(field)_
- `format` — Output format _(field)_

## Output

- Bitcrushed audio (audio)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `bits` — Bit depth (1-16)
- `sample_rate_hz` — Effective sample rate (Hz)
- `mix` — Wet/dry mix (0-1)
- `drive` — Input drive (0.25-4)
- `output_gain` — Output gain (0.25-4)
- `anti_alias` — Anti-aliasing (0-1)
- `mode` — Quantiser curve
- `format` — Output format
- `url` — fetch the input file from a public URL (CORS-permitting)

Example: `https://gizza.ai/tools/bitcrush/?url=https://example.com/input&bits=8&sample_rate_hz=8000&mix=1&drive=1&output_gain=1&anti_alias=0.5&mode=lin&format=mp3`

---

## About this tool

Bitcrush turns clean audio into deliberate digital grit. It first resamples the
audio to a fixed 48 kHz working rate, then holds samples to reach the requested
effective sample rate and quantises each sample to a smaller bit depth with
ffmpeg's `acrusher` filter. The result is the crunchy aliasing, stepped dynamics
and retro texture associated with old samplers, handheld games and lo-fi effects.

Example: upload a drum loop, leave `bits = 8`, set `sample_rate_hz = 8000`, keep
`mix = 1`, and export MP3 to get a fully crushed 8-bit-style loop. For a gentler
bed under vocals or synths, try `bits = 12`, `sample_rate_hz = 16000`, and
`mix = 0.45` so the original signal remains audible underneath the crushed layer.

The requested sample rate snaps to the nearest divisor of 48,000 Hz because the
underlying sample hold is a whole number of samples. For example, 22,050 Hz snaps
to an effective 24,000 Hz. Inputs are limited to 10 MiB and embedded album-art
video streams are discarded.

## FAQ

<details>
<summary>What does bit depth change?</summary>

Lower bit depths mean fewer possible sample levels. A 16-bit setting is mild,
8-bit sounds like classic sampler crunch, and 4-bit or below becomes deliberately
harsh digital distortion.

</details>

<details>
<summary>Why is the effective sample rate sometimes different from what I typed?</summary>

The filter holds each sample for a whole number of output samples after resampling
to 48 kHz, so rates snap to `48000 / N`. The page accepts values from 192 Hz to
48 kHz and uses the nearest achievable hold count.

</details>

<details>
<summary>How do mix, drive and output gain work together?</summary>

`drive` pushes the signal into the quantiser before distortion, `mix` blends the
crushed signal with the original, and `output_gain` adjusts the level after the
crush. If a high drive setting clips, lower output gain instead of lowering drive.

</details>

<details>
<summary>Which audio formats can I export?</summary>

MP3 is the default. WAV and FLAC keep a lossless re-encode, OGG uses Vorbis, and
M4A uses AAC. Browser decoding support for previews can vary by format, but the
download is still generated by ffmpeg.

</details>

## Related tools

- [Fit Audio to an Exact Length](https://gizza.ai/tools/audio-fit-to-length/): Make any audio file an exact number of seconds — pad it with silence when it's short or trim it when it's long. Runs in your browser, nothing uploaded.
- [Shorten Long Audio Pauses](https://gizza.ai/tools/audio-pause-shortener/): Tighten speech pacing by shortening long silent gaps to a natural pause length in your browser. Nothing is uploaded, free.
- [Resample an Audio File](https://gizza.ai/tools/audio-resampler/): Change any audio file's sample rate — 8 kHz voice to 192 kHz studio — with high-quality ffmpeg resampling, right in your browser. Runs locally, nothing is uploaded, free.
- [Add Chorus to Audio](https://gizza.ai/tools/chorus/): Add a configurable chorus effect to an audio file in your browser with ffmpeg: voices, delay, depth, rate, decay, and output format controls.
- [Remove Harsh Sibilance from Vocals](https://gizza.ai/tools/de-esser/): Free browser de-esser: duck harsh s, sh and t sibilance on vocals, narration and podcasts. Tune amount, band and reduction, or audition the removed esses.
