We present a thin form-factor lensless camera, FlatCam, that consists of a coded mask placed on top of a bare, conventional sensor array. FlatCam is an instance of a coded aperture imaging system in which each pixel records a linear combination of light from multiple scene elements. A computational algorithm is then used to demultiplex the recorded measurements and reconstruct an image of the scene. In contrast with vast majority of coded aperture systems, we place the coded mask extremely close to the image sensor that can enable a thin system. We use a separable mask to ensure that both calibration and image reconstruction are scalable in terms of memory requirements and computational complexity. We demonstrate the potential of our design using a prototype camera built using commercially available sensor and mask.