NOTE: The video in the player above has been edited due to its graphic nature.
Los Angeles police said the attack happened in the 1000 block of South Vermont Avenue at about 6 p.m. Friday.
Officials said the man, identified as 22-year-old Jae Yang of Korea, approached the woman and asked if she was Korean.
The woman told the man she was in fact Korean, according to detectives. Authorities said Yang walked away only to return with a hammer.
Surveillance video shows the woman on her cellphone as Yang walks around the corner and strikes her several times with a hammer.
The woman yelled for help and a security guard was able to detain Yang until police arrived at the scene.
Authorities said the woman suffered numerous cuts and bruises during the attack. She was taken to the hospital, but has since been released.
Yang has been charged with attempted murder with a hate crime enhancement.
"Our suspect had targeted this person because she was a female and she was Korean, thus giving us the hate crime enhancement based on his actions and the statement," Capt. David Kowalski said.
Police said the man and woman had never met and she was the first person he had seen.