> For the complete documentation index, see [llms.txt](https://hirize.gitbook.io/hirize/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hirize.gitbook.io/hirize/getting-started/publish-your-docs/backend-codes-and-tools.md).

# Backend Codes & Tools

### Sending Files in Base64

\
Send us the file you want to parse in Base64 format, without any file reading or text extraction. Send it as raw Base64. For example, you can use the following code:

```python
import base64

def file_to_base64(file_path):
    with open(file_path, "rb") as file:
        base64_encoded = base64.b64encode(file.read()).decode("utf-8")
    return base64_encoded

# Example usage
file_path = "bill-gates.pdf"  # Change this to your file path
base64_string = file_to_base64(file_path)
print(base64_string)

```
