The first editions of Rowling’s Harry Potter books credited the author as J.K. Rowling.
Rowling’s publishers wanted a name that would appeal broadly to young readers, and the initial “K” was added because they believed a gender-neutral author name would be advantageous. Rowling had no middle name at birth, so she selected Kathleen, the name of her paternal grandmother, for the publishing identity.
The name is usually written without periods in modern branding as J.K. Rowling, while some references use “JK Rowling.” Her legal name later changed through marriage, but the established author name remained professionally associated with her books.
The choice is different from the pseudonym Robert Galbraith, which Rowling used for her crime novels. “Joanne Rowling” is her birth name, while “J.K. Rowling” is the public author name attached to Harry Potter.