Okay, OK, and O.K. are all acceptable. Okay has the edge in formal contexts, while the briefer OK is more common in informal contexts. The lowercase ok and the one-letter k are common in Textish, but they might be considered out of place in other types of writing.
The origins of OK (the original spelling) are mysterious, but everyone agrees that the word comes from the U.S., and that it is probably the most successful Americanism in the world. It’s used in practically every country—even in those with little access to international media—and it means the same everywhere.
Examples
Many of our favorite publications use the two-letter, capitalized OK—for example:
OK, maybe it’s not there yet. [Wall Street Journal]
OK, so what myths are we talking about? [Guardian]
It might be OK for a beefy Wallaby to stare down a bunch of powerfully built Kiwis as they launch into a ferocious, blood-curdling haka … [Sydney Morning Herald]
A few others favor okay:
Okay, okay, I’ll stop right there. [The Star-Ledger]
FDA okays Thermo Fisher test to help kidney transplant [Reuters]
And the idiosyncratic New York Times likes the faux-abbreviation O.K.—for example:
We’ve done O.K. in the downturn because we started selling online in 2007. [New York Times]

