Hikvision camera admin password reset tool

If you have ever locked yourself out of a Hikvision camera or NVR by forgetting the admin password, and had to beg Hikvision or anyone else for an unlock code, you will appreciate this. I present a small tool that lets you generate your own unlock codes which can be entered into SADP to reset the admin password on any of your Hikvision cameras. This tool is written in HTML/CSS/JavaScript so it runs in any modern web browser and you can view the complete source code easily.

Disclaimer: This tool may or may not work for your camera or NVR. Please follow the instructions very carefully and be precise in all your inputs into the tool. Some devices on newer firmware require a more secure password reset procedure which I can not help with. I think this tool will only work with cameras running firmware older than 5.3.0. I do not know what version is the cutoff for NVRs.

Update:
Some Hikvision devices (perhaps only NVRs) show their model number appended to the beginning of their serial numbers. You must remove this from the serial number that you enter into the tool. For example, if the serial number shows as DS-7208HVI-ST0123456789AAWR987654321WCVU and the device's model number is DS-7208HVI-ST, then the true serial number is 0123456789AAWR987654321WCVU

Without further ado, here is a link so you can use it without downloading anything: http://www.ipcamtalk.com/hik-pw-reset.php

[TABLE="class: outer_border, width: 0"]
[TR]
[TD][/TD]
[/TR]
[/TABLE]


Inside this spoiler block is the complete source code which you can write to a .html file on your computer, allowing you to use it offline.
HTML:
<html>
<head>
    <title>Hikvision Password Reset</title>
    <script type="text/javascript">
        function padLeft(str, l, c) { str = str + ""; return Array(l - str.length + 1).join(c || " ") + str }
        function initialize()
        {
            document.getElementById("year").value = new Date().getYear() + 1900;
            document.getElementById("month").value = padLeft(new Date().getMonth() + 1, 2, '0');
            document.getElementById("day").value = padLeft(new Date().getDate(), 2, '0');

            document.getElementById("serialNumber").onchange = GenerateSerialCode;
            document.getElementById("year").onchange = GenerateSerialCode;
            document.getElementById("month").onchange = GenerateSerialCode;
            document.getElementById("day").onchange = GenerateSerialCode;
        }
        function GenerateSerialCode()
        {
            var serialNumber = document.getElementById("serialNumber").value;
            var year = document.getElementById("year").value;
            var month = document.getElementById("month").value;
            var day = document.getElementById("day").value;
            var plainText = serialNumber + year + month + day;

            var magicNumber = 0;
            for (var i = 0; i < plainText.length; i++)
                magicNumber += (plainText.charCodeAt(i) * (i + 1)) ^ (i + 1);

            magicNumber *= 1751873395;
            magicNumber = magicNumber >>> 0; // convert to 32 bit integer

            var magicWord = magicNumber + "";
            var serialCode = "";
            for (var i = 0; i < magicWord.length; i++)
            {
                var c = magicWord.charCodeAt(i);
                if (c < 51)
                    serialCode += String.fromCharCode(c + 33);
                else if (c < 53)
                    serialCode += String.fromCharCode(c + 62);
                else if (c < 55)
                    serialCode += String.fromCharCode(c + 47);
                else if (c < 57)
                    serialCode += String.fromCharCode(c + 66);
                else
                    serialCode += String.fromCharCode(c);
            }

            document.getElementById("output").innerHTML = serialCode;
        }
        window.onload = initialize;
    </script>
    <style type="text/css">
        body
        {
            width: 450px;
        }
        .description
        {
            margin: 20px 0px;
        }
        .label
        {
            margin: 10px 0px;
        }
        .input
        {
            margin-bottom: 10px;
        }
        #output
        {
            font-weight: bold;
            border: 1px solid black;
            padding: 10px;
            font-size: 2em;
            max-width: 100%;
        }
    </style>
</head>
<body>
    <div><h2>Hikvision Camera Password Reset Utility</h2></div>
    <div class="description">This tool will generate a <b>password reset code</b> which you may use to reset a forgotten admin password for a Hikvision camera.</div>
    <div class="label">Enter your camera's complete CASE SENSITIVE serial number, as seen in the <a href="http://www.google.com/search?q=Hikvision%20SADP">Hikvision SADP</a> tool:</div>
    <div class="input"><input type="text" id="serialNumber" style="width: 100%" placeholder="Hikvision Camera Serial Number" /></div>
    <div class="label"><b>Important:</b> The date you enter below much match with the camera's clock. <b>Most likely it is not today's date!</b> To find out what date your camera thinks it is, power cycle your camera, give it time to boot up, and then refresh your camera list in SADP and check the Start Time column.</div>
    <div class="label">Enter the <b>4 digit</b> year the camera thinks it is:</div>
    <div class="input"><input type="text" id="year" style="width: 20%" /></div>
    <div class="label">Enter the <b>2 digit</b> month the camera thinks it is:</div>
    <div class="input"><input type="text" id="month" style="width: 20%" /></div>
    <div class="label">Enter the <b>2 digit</b> day the camera thinks it is:</div>
    <div class="input"><input type="text" id="day" style="width: 20%" /></div>
    <div class="label">Your <b>password reset code</b> will appear below.</div>
    <div id="output"></div>
    <div class="label">The code must be entered into the <a href="http://www.google.com/search?q=Hikvision%20SADP">Hikvision SADP</a> tool in the <b>Serial code</b> box (called <b>Security Code</b> in later SADP versions). The camera will compare its internal date and time with the date and time you have entered above. The Serial Number and date much match perfectly or else the code will not work.</div>
</body>
</html>
Some will say it is irresponsible to publish this. I disagree. Evidently a number of people outside of Hikvision have possessed the ability to generate these codes for a while now. I found this (similar) functionality freely available for download elsewhere, so I really don't feel bad about releasing this and making it a bit easier to recover your cameras.
Thanks for the tool.I email hikvision and it was going to be at the earliest Feb16/2016 before any help with security code was offered.
 
bp2008, Very good job, is full functionally with a DS-7208-HGHI-SHSE, only with the part number with out the model reference. Thanks
 
Worked on my 5.3.0. But had to fill in the complete line ( including modelnr ) in serial field, then it worked.
 
Worked on my 5.3.0. But had to fill in the complete line ( including modelnr ) in serial field, then it worked.

Hello,
I did not manage to unlock my webcam,
What is your camera model and version SADP
(My model is: Chinese DS-2CD2432F-IW, received with v5.3.0 build 150513, SADP v3.0.0.2)
 
DS-2CD3132F-IWS camera, sadp tool 5.2.5
Make sure you will the complete serial, including the model number , and the start time you have to check in sadp tool.
 
I buy a Chinese 2CD2432 in v5.3.0 manufacture in 01/2016 (with the new password protection ?) the seller have told me that the password was 12345abc, but it does not work. not even 12345, abc12345, admin, 123456789abc ...
Only he is on vacation until 15/02.

I tested the tool on this site but it does not. with the serial number in full or not, with SADP v2.2.1.1 or v2.2.3.6 or v3.0.0.2 or iVMS v2.4.1.3. nothing works.

I tried to ask the support Hikvision:

[TD="colspan: 2"]support.fr@hikvision.com -> Dear customer, indeed, our services in France are dedicated to customers purchasing products through our distribution network. Thanks for your understanding.[/TD]

support.eu@hikvision.com -> need:
Customer Information
Name*:
E-mail:
Contact number:
Company Name*:
Address:
Country*:
Type *: (user, installer)
Your dealer *
Device Information
The complete serial number and firmware version *:
Departure date*:



[TD="colspan: 2"]support@hikvision.com -> We will out of the office from Feb 6th to Feb 15th, For password resetting, please kindly offer the information below:
*Your country and region*Purchasing channel(from what company and country)
*Device start time & date on SADP(example: 2014-05-22 1:11 PM)
*Full serial number on SADP(example: DS-72xxABCD-XY/SN123456789ABCD123456789ABCD)
*Firmware version
*Your contact information[/TD]

I'll have an answer if I give my true distributor?
 
Last edited by a moderator:
Hello

Sorry to off for my bad english come from Austria :-) and my English is not quite good.
i have my first ip camera a Hikvision DS-2CD2142FWD-IWS and already a problem with here.

My first time that I would have to change the password and as this with copy and paste,
and unfortunately I cannot now come in as admin.

my camera Software Version is V5.3.6build 151105

i tried wih by2008 reset code generate but it does not work or the reset code is wrong.


There is a different password Generator?
 
Hi i have solved my problem.
In the camera is a reset button with which I could undo it to the factory settings.
Only power on and hold 10 seconds the reset button and done.
yeah and now it worked perfectly.

lg
FlaP
 
  • Like
Reactions: bighendo
Hello,
I just found the solution!
SADP not take my password, because I can not communicate with the webcam because of its IP / Mask
192.168.254.14/255.255.255.0 Gateway: 192.168.1.1 (default on the webcam seen by SADP)
So I directly connect the webcam to the PC in ethernet and I changed the IP address on the PC:
192.168.254.13/255.255.255.0 gateway 192.168.1.1
then http://192.168.254.14/ and have access to the web interface of the camera (no more "time out")
I test: admin / 12345 and voila. I change the IP address and admin password by default!
good luck to the otherUT82p5PXA8XXXagOFbXA.jpg
 
Hello I had a support@hikvision.com response:
Dear customer,
Please make sure that you didn’t export the device key file again before you import the encrypt file.
Each device key only matches one encrypt file, the encrypt file required will change every time you export the device key.
Attached please find the encrypt file and import again.
Best Regards,

For the new firmware (5.3.0 and 5.3.6 ?)
And the encrypt.XML file look like this:

ih0JJy9cYvVdqgbgnIlJpkPLeCZnsLhX00Ms6wUAPAcK/MvjOOG2atVDKzSQrZGnxPyQz1ibU0dyAxL+ehtoEl4c0mS4xMd5hugKHbQtmhGzX3PDTECzNC2Ym/4lT4lW3wGFgYL9fB8lf/rkMv7vvkese2w4M1ZRuoZcq5vwV+8=
 
Hi,
for all who ordered a new camera from China with a version 5.3.x.
The default password is changed from "12345" to "123456789abc".
For me it helped.
Regards

Well, I'll be **** :mad-new: What insanity is that; changing the default password. But yes yes yes, it worked for me, much quicker and healthier than my extra-large, double-strength tea and the SADP tool. Hero-level thanks for your post.
 
dear Hikvision Product

i am user hikvision product installer and supporter to my all customer .
now,my customer is forgot admin password on DVR
i want to reset admin password for them .how can i do it?can you help me please?
DVR Serial No:DS-7208HVI-ST0120121118AAWR413008667WCVU
SF Ver:1.3.2_121107
Now,i haven security code on my DVR.Can you help me please?
 
The tool works perfectly for me, when I enter the code into SADPtool.. I get the message that the password is recovered.. but it never tells me the password.. and the default password("12345") doesnt work
 
Another thanks for this tool! I had two cameras setup and tested but then left them powered down for several months. When I hooked them up and tried logging back in, I couldn't get in with my password or the default. The reset tool worked perfectly on two Chinese serial cameras.
 
sigh... have 5 factory-fresh cameras, ordered from Canadian dealer... but they arrived ( surprise! ) direct from China.

DS-2CD2035-I

firmware is V5.3.3 which leads me to believe they'd be default IP 192.168.1.64 and admin pw 123456789abc
(thats what the docs for this model say!)
But no cam there... found it at 192.0.0.64 instead.

admin login won't accept PW 123456789abc
also doesn't like 12345 nor 12345abc nor a blank pw

Tried the reset tool here both with date reported by SADP tool ( 1970-01-01) and today's date.
Tried full SN and also with prefix DS-2CD2035-I stripped out.

NO JOY! :(

Tried hardware reset button ( 10 seconds) ... still no joy, but I'm getting "try again in 30 minutes" now, on attempting 12345abc

going for lunch...
 
have 5 factory-fresh cameras,
Then they should require that you go through the 'activation' process.
It sounds like someone has messed with them (or maybe being a bit kinder, tested them) and forgot to let you know what password they applied after activation.

Hardware reset should work OK. Pressed before power-up?