How BV and av IDs relate
Bilibili gave every video a sequential number, the av ID, until 23 March 2020. Sequential numbers made it easy to count uploads and crawl the site, so Bilibili started showing a 12-character BV ID in its links instead. The av number didn't go away: Bilibili's API still returns it as aid, and links like bilibili.com/video/av170001 still open the video.
A BV ID is the av number run through a fixed XOR and a base-58 encoding, with a few characters swapped. That's why the conversion needs no lookup and why the result is exact.
When you need the other ID
- Old forum posts, comments and wiki pages cite av numbers that you want to open as modern links.
- Scripts and spreadsheets that store
aidfrom Bilibili's API need a BV ID to build a link, or the reverse. - Checking that two links with different-looking IDs point to the same video.
What this converter doesn't do
It doesn't look the video up, so it can't tell you the title or whether the video was deleted. It doesn't handle bangumi episode IDs (ep) or season IDs (ss), which are separate numbering schemes. To save a video once you have its ID, paste it into the Bilibili video downloader.