Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time

Using Libsodium in PHP Projects

This online documentation attempts to introduce PHP developers to the libsodium extension. Everything contained within is made available for free by Paragon Initiative Enterprises to promote the adoption of better security practices in the PHP community.

You can read this ebook online at Github or on P.I.E.'s online book reader. Note that we do use HTML with our Markdown and Github might not like that. The Paragon Initiative Enterprises online book reader is ad-free and will never be paywalled.

This ebook is available to the public under the Creative Commons Attribution International 4.0 License. Feel free to fork, download, print, copy, redistribute, share, and remix it to your heart's content.

See also: Libsodium Quick Reference

If you're looking for the Libsodium source code, go here instead: