# Format Bytes
[component-header:sl-format-bytes]
Formats a number as a human readable bytes value.
```html preview
The file is in size.
```
## Examples
### Formatting Bytes
Set the `value` attribute to a number to get the value in bytes.
```html preview
```
### Formatting Bits
To get the value in bits, set the `unit` attribute to `bits`.
```html preview
```
### Localization
Use the `locale` attribute to set the number formatting locale.
```html preview
```
[component-metadata:sl-format-bytes]